-- GENERATED SPELL FOR [Skybreaker Squad Leader] --


function spell0_31737(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31737', 646, 1)
end

function spell1_31737(pUnit, Event) --@Frost Shot,n/a--
pUnit:FullCastSpellOnTarget(12551,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31737', 10276, 1)
end

function spell2_31737(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31737', 607, 1)
end

function Sorts_31737(pUnit, Event)
local choix_sorts_31737 = math.random(0, 2)
if choix_sorts_31737 == 0 then
pUnit:RegisterEvent('spell0_31737', 1, 1)
end
if choix_sorts_31737 == 1 then
pUnit:RegisterEvent('spell1_31737', 1, 1)
end
if choix_sorts_31737 == 2 then
pUnit:RegisterEvent('spell2_31737', 1, 1)
end
end

function mob31737_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31737', math.random(1500, 3000), 1)
end

function mob31737_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31737_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31737_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31737, 1, 'mob31737_Action')
RegisterUnitEvent(31737, 2, 'mob31737_Leave')
RegisterUnitEvent(31737, 3, 'mob31737_Kill')
RegisterUnitEvent(31737, 4, 'mob31737_Die')
